package com.zhx.common.chat.service;

import com.zhx.common.chat.domain.entity.RoomFriend;
import com.zhx.common.chat.domain.entity.RoomGroup;
import com.zhx.common.chat.domain.vo.request.ChatMessageMemberReq;
import com.zhx.common.chat.domain.vo.request.GroupAddReq;
import com.zhx.common.chat.domain.vo.request.member.MemberAddReq;
import com.zhx.common.chat.domain.vo.request.member.MemberDelReq;
import com.zhx.common.chat.domain.vo.request.member.MemberReq;
import com.zhx.common.chat.domain.vo.response.ChatMemberListResp;
import com.zhx.common.chat.domain.vo.response.MemberResp;
import com.zhx.common.common.domain.vo.resp.CursorPageBaseResp;
import com.zhx.common.websocket.domain.vo.resp.ChatMemberResp;

import java.util.List;

public interface RoomService {
    /**
     * 获取好友聊天室
     * @param uid
     * @param friendUid
     * @return
     */
    RoomFriend getFriendRoom(Long uid, Long friendUid);

    /**
     * 获取群详情
     * @param uid
     * @param id
     * @return
     */
    MemberResp getGroupDetail(Long uid, long id);

    /**
     * 分页获取群成员列表
     * @param request
     * @return
     */
    CursorPageBaseResp<ChatMemberResp> getMemberPage(MemberReq request);

    /**
     * 获取房间内群成员列表
     * @param request
     * @return
     */
    List<ChatMemberListResp> getMemberList(ChatMessageMemberReq request);

    /**
     * 移除群成员
     * @param uid
     * @param request
     */
    void delMember(Long uid, MemberDelReq request);


    /**
     * 创建群聊房间
     * @param uid
     * @return
     */
    RoomGroup createGroupRoom(Long uid);

    /**
     * 新增群组
     * @param uid
     * @param request
     * @return
     */
    Long addGroup(Long uid, GroupAddReq request);

    /**
     * 邀请好友
     * @param uid
     * @param request
     */
    void addMember(Long uid, MemberAddReq request);

    /**
     * 禁用房间
     * @param list
     */
    void disableFriendRoom(List<Long> list);

    /**
     * 创建好友房间
     * @param list
     * @return
     */
    RoomFriend createFriendRoom(List<Long> list);
}
